package controller
{
	import model.DataProxy;
	import model.ViewProxy;
	
	import org.puremvc.as3.interfaces.ICommand;
	import org.puremvc.as3.interfaces.INotification;
	import org.puremvc.as3.patterns.command.SimpleCommand;
	
	import view.LoginView;
	import view.MenuView;

	public class DataCommand extends SimpleCommand implements ICommand
	{
		override public function execute( notification:INotification ):void
		{
			var name:String = notification.getName();
			var body:Object = notification.getBody();
			
			switch( name )
			{
				case ApplicationFacade.DATA_GET:
					dataProxy.applicationDataGet();
					break;
			}
		}
		
		private function get dataProxy():DataProxy
		{
			return facade.retrieveProxy( DataProxy.NAME ) as DataProxy;
		}
		
		private function get viewProxy():ViewProxy
		{
			return facade.retrieveProxy( ViewProxy.NAME ) as ViewProxy;
		}
	}
}